package com.gqzm.iaas.component;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @ClassName: {@link TaskPostRunner}
 * @description: TODO
 * @author: peter qin
 * @date: 2023 11 29
 * @version: 1.0
 **/
@Slf4j
@Component
public class TaskPostRunner implements ApplicationRunner {
    @Resource
    private TaskCache taskCache;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        log.info("初始化任务，并执行=====================");
        taskCache.startLoopTask();
    }
}
